#! /bin/sh

# make synthetic data with suplane
 suplane ntr=60 | sushw key=trid a=1 b=1 s=3 > temp.su
# suxwigb xbox=50 title="Synthetic data"  < temp.su &

# make a ricker wavelet with suwaveform
 suwaveform type=ricker1 fpeak=20 > ricker.su
# suxwigb xbox=250 title="ricker wavelet" < ricker.su &

# convolve the ricker wavelet with the temp.su data
 suconv sufile=ricker.su < temp.su | suaddnoise sn=20 > temp1.su
# suxwigb xbox=450 title="Synthetic data convolved with Ricker wavelet"  < temp1.su &

# use suhrot to rotate the temp
 suhrot < temp1.su angle=deg a=245  > temp2.su
# suxwigb xbox=50 ybox=250 xtitle="Rotated data" < temp2.su &

# next rotation
 surange < temp2.su
 suhrot < temp2.su angle=deg a=335 verbose=1 > temp3.su
# suxwigb  xbox=250 ybox=250 title="Rotated back" < temp3.su &

# window temp2.su data 
suwind key=trid min=17 max=17 < temp2.su > S22.su
suwind key=trid min=16 max=16 < temp2.su > S21.su
suwind key=trid min=17 max=17 < temp3.su > S11.su
suwind key=trid min=16 max=16 < temp3.su > S12.su

suxwigb < S11.su xbox=50 ybox=50 hbox=500 wbox=500 title="S11" clip=1 &
suxwigb < S12.su xbox=550 ybox=50 hbox=500 wbox=500 title="S12" clip=1 &
suxwigb < S21.su xbox=50 ybox=550 hbox=500 wbox=500 title="S21" clip=1 &
suxwigb < S22.su xbox=550 ybox=550 hbox=500 wbox=500 title="S22" clip=1 &
